#include <bits/stdc++.h>

using namespace std;

const int N = 1e5 + 100;
int n,ans;
int a[N],b[N],mat[N],la[N];
bool used[N],del[N];

void read(int &res){
    int x = 0,w = 1;
    char ch = 0;
    while(ch < '0' || ch > '9'){
        if(ch == '-') w = -1;
        ch = getchar();
    }
    while(ch >= '0' && ch <= '9'){
        x = (x<<3) + (x<<1) + (ch-'0');
        ch = getchar();
    }
    res = x * w;
}

int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    read(n);
    for(int i = 1;i <= n;i++){
        read(a[i]);
    }
    sort(a + 1,a + n + 1);
    for(int i = 1;i <= n;i++){
        la[a[i]] = i;
        b[i] = a[i];
    }
    int len = unique(b + 1,b + n + 1) - b;
    for(int i = 1;i <= len;i++) mat[b[i]] = la[b[i]] + 1;
    for(int i = 1;i <= n;i++){
        for(int j = mat[a[i]];j <= n;j++){
            if(used[j]) continue;
            if(a[j] > a[i]){
                del[i] = true;
                used[j] = true;
                break;
            }
        }
    }
    for(int i = 1;i <= n;i++)
        if(!del[i]) ans++;
    cout << ans << endl;
    return 0;
}
